<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    
</body>
<script>
    // let num = 10;
    // function test01(){
    //     let num = 100;
    //     console.log(num);
    // }
    // function test02(){
    //     let num = 200;
    //     console.log(num);
    // }
    // function test03(){
    //     num = 300;
    //     console.log(num);
    // }
    // console.log(num);
    // test01();
    // test02();
    // test03();
    // console.log(num);

    // let i = 1
    // for(i = 1; i <= 100; ++i){
    //     let num = 1;
    // }
    // console.log(i);

    // let num = 10;
    // function test01(){
    //     let num = 100;
    //     console.log(num);
    //     function test02(){
    //         let num = 200;
    //         console.log(num)
    //     }
    //     test02()
    //     console.log(num);
    // }
    // test01()


    // let a = {}
    // let student = {
    //     name:"001",
    //     height:"199",
    //     weight:"99kg",
    //     sayhello:function(){
    //         console.log("Hello");
    //     }
    // }
    // console.log(student.name);
    // console.log(student['height']);
    // console.log(student['weight']);
    // student.sayhello();

    // let student = new Object();
    // student.name = "小明";
    // student.height = 100;
    // student['weight'] = 75;
    // student.SayHello = function(){
    //     console.log("Say hello");
    // }
    // console.log(student.name);
    // console.log(student['height']);
    // student.SayHello();

    // function People(name, height, weight){
    //     this.name = name;
    //     this.height = height;
    //     this.weight = weight;
    //     this.Say = function(){
    //         console.log(name + " Hello")
    //     }
    // }
    // let xiaoming = new People("小明", 188, 60)
    // xiaoming.Say()

    class People{
        constructor(name, height, weight){
            this.name = name;
            this.height = height;
            this.weight = weight;
        }
        Say(){
             console.log(this.name + "正在说");
        }
        static other = "other";
        static Sum(){
            return 100;
        }
    }
    // let xiaoming = new People("小明", 178, 60);
    // console.log(xiaoming);
    // xiaoming.Say();
    // alert(People.other);
    // alert(People.Sum());


    class Student extends People{
        constructor(name, height, weight, number){
            super(name, height, weight);
            this.number = number;
        }
        Say(){
            alert(this.name + " Say Hello");
        }
    }
    let xiaoming = new Student("小明", 100, 100, 1);
    xiaoming.Say();
</script>
</html>